#include "Character.h"


Character::~Character()
{
}


Character::Character(const Character& c)
{
	name = c.getName();
	lastName = c.getLastName();
	strength = c.getStrength();
	agility = c.getAgility();
	endurance = c.getEndurance();
	intelligence = c.getIntelligence();
	wisdom = c.getWisdom();
	charisma = c.getCharisma();
	position = c.getPosition();
}


Character& Character::operator=(const Character & c)
{
	if (this != &c)
	{
		name = c.getName();
		lastName = c.getLastName();
		strength = c.getStrength();
		agility = c.getAgility();
		endurance = c.getEndurance();
		intelligence = c.getIntelligence();
		wisdom = c.getWisdom();
		charisma = c.getCharisma();
		position = c.getPosition();
	}
	return *this;
}


void Character::move(float moves)
{
	float xIncrement = position.getDir().getXDir() * moves;
	float yIncrement = position.getDir().getYDir() * moves;
	position.setX(position.getX() + xIncrement);
	position.setY(position.getY() + yIncrement);
}